2022-08-05 19:11:10 +02:00
|
|
|
{
|
|
|
|
"Definition": {
|
|
|
|
"prefix": "definition",
|
|
|
|
"description": "Basic purescript definition",
|
2022-09-25 22:03:11 +02:00
|
|
|
"body": ["$1 :: $2", "$1 = $3"]
|
2022-08-05 19:11:10 +02:00
|
|
|
},
|
|
|
|
"SProxy": {
|
|
|
|
"prefix": "sproxy",
|
|
|
|
"description": "Generate a proxy constant",
|
2022-09-25 22:03:11 +02:00
|
|
|
"body": ["_$1 :: Proxy \"$1\"", "_$1 = Proxy"]
|
2022-08-05 19:11:10 +02:00
|
|
|
},
|
|
|
|
"Proxy": {
|
|
|
|
"prefix": "proxy",
|
|
|
|
"description": "Generate a proxy constant",
|
2022-09-25 22:03:11 +02:00
|
|
|
"body": ["_$1 :: Proxy $1", "_$1 = Proxy"]
|
2022-08-05 19:11:10 +02:00
|
|
|
},
|
|
|
|
"Prop": {
|
|
|
|
"prefix": "prop",
|
|
|
|
"description": "Prop lens",
|
2022-09-25 22:03:11 +02:00
|
|
|
"body": ["_$1 :: Lens' $2 $3", "_$1 = prop (Proxy :: _ \"$1\")"]
|
2022-08-05 19:11:10 +02:00
|
|
|
},
|
|
|
|
"Variant constructor": {
|
|
|
|
"prefix": "inj",
|
|
|
|
"description": "Generate a constructor for a variant an inline sproxy",
|
|
|
|
"body": [
|
|
|
|
"$1 :: forall r a. a -> Variant ( $1 :: a | r)",
|
|
|
|
"$1 = inj (SProxy :: SProxy \"$1\")"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"Full variant constructor": {
|
|
|
|
"prefix": "injf",
|
|
|
|
"description": "Generate a constructor for a variant with an external sproxy definition",
|
|
|
|
"body": [
|
|
|
|
"$1 :: forall r a. a -> Variant ( $1 :: a | r)",
|
|
|
|
"$1 = inj _$1",
|
|
|
|
"",
|
|
|
|
"_$1 :: Proxy \"$1\"",
|
|
|
|
"_$1 = Proxy"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"Example code": {
|
|
|
|
"prefix": "ex",
|
|
|
|
"description": "Provide example usage for some piece of code",
|
2022-09-25 22:03:11 +02:00
|
|
|
"body": ["-- |", "-- | Ex:", "-- | ```purs", "-- | $0", "-- | ```"]
|
|
|
|
},
|
2022-08-08 16:25:54 +02:00
|
|
|
"Section": {
|
|
|
|
"prefix": "section",
|
|
|
|
"description": "Delimit a section using 10 dashes",
|
2022-09-25 22:03:11 +02:00
|
|
|
"body": "---------- $0"
|
2022-08-08 16:25:54 +02:00
|
|
|
},
|
|
|
|
"Typeclass instances": {
|
|
|
|
"prefix": "sinstances",
|
|
|
|
"description": "Delimit a section which declares typeclass instances",
|
2022-09-25 22:03:11 +02:00
|
|
|
"body": ["---------- Typeclass instances", "$0"]
|
|
|
|
},
|
|
|
|
"If": {
|
|
|
|
"prefix": "if",
|
|
|
|
"description": "If then else expression",
|
|
|
|
"body": ["if $1", "\tthen $2", "\telse $3"]
|
2022-08-05 19:11:10 +02:00
|
|
|
}
|
|
|
|
}
|