copy snippets from mac

This commit is contained in:
Willem van den Ende
2025-10-10 10:21:45 +01:00
parent 934d5ecd36
commit 2bd933dced
19 changed files with 417 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
# key: thenewtype
# name: new purescript newtype in its' own module
# --
# in 'text-mode' because purescript-mode generates parse error
module ${1:ModulePrefix}.${2:NewTypeName} (
$2(..)
, aDummy
) where
import Data.Firebase.Foreign (class ToFirebaseForeign)
import Data.Foreign (toForeign, readString)
import Data.Foreign.Class (class IsForeign)
import Data.Generic (class Generic, gCompare, gEq, gShow)
import Test.QuickCheck.Arbitrary (class Arbitrary, arbitrary)
import Prelude (class Eq, class Ord, class Show, ($),bind, pure)
import UReview.Prelude (readForeign)
newtype $2 = $2 {${4:fieldName}:: ${5:Type}}
aDummy :: $2
aDummy = $2 {$4: "$6"}
derive instance generic$2 :: Generic $2
instance show$2 :: Show $2 where
show = gShow
instance eq$2 :: Eq $2 where
eq = gEq
instance ord$2 :: Ord $2 where
compare = gCompare
instance arb$2 :: Arbitrary $2 where
arbitrary = do
$4 <- arbitrary
pure ($2 {$4 })
instance isForeign$2 :: IsForeign $2 where
read fo = readForeign fo
instance toFirebaseForeign$2 :: ToFirebaseForeign $2
where toFire = ${7:conversionFn} >>> toForeign
$0
+8
View File
@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: plantuml handwritten
# key: handwritten_plantuml
# --
skinparam {
handwritten true
monochrome true
}