Skip to content

Instantly share code, notes, and snippets.

View jbrown215's full-sized avatar

Jordan Brown jbrown215

View GitHub Profile
1190934425:6 x 6 All Terrain Vehicle
366425329:FIR AWS(AirWeaponSystem)
787892271:A-10 Warthog
450814997:CBA_A3
497660133:CUP Weapons
497661914:CUP Units
541888371:CUP Vehicles
1739713277:vurtual's vehicle base
463939057:ace
620260972:ALiVE
@jbrown215
jbrown215 / transform.js
Created January 14, 2020 22:08
Flow exact-by-default jscodeshift transform
module.exports = function transformer(file, api) {
const j = api.jscodeshift;
const root = j(file.source);
root
.find(j.ObjectTypeAnnotation, {inexact: false, exact: false})
.forEach(path => {
path.node.inexact = true;
});
return root.toSource();
LiquidHaskell v0.8.2.2 Copyright 2013-17 Regents of the University of California. All Rights Reserved.
**** DONE: A-Normalization ****************************************************
**** DONE: annotate ***********************************************************
**** RESULT: ERROR *************************************************************
select :: fs:[Filter a <\u -> p>] -> [Tagged <\u -> p> {v:a | evalQ fs a} ]
LiquidHaskell Copyright 2013-17 Regents of the University of California. All Rights Reserved.
**** DONE: A-Normalization ****************************************************
**** DONE: Extracted Core using GHC *******************************************
**** DONE: Transformed Core ***************************************************
Code:
{-@ test2 :: [Blob] -> [{v: Blob | xVal v <= 10 && yVal v <= 20}] @-}
test2 = filterQ q2
where
q2 = (VarX `Le` (Const 11)) `And` (VarY `Le` (Const 20))
Error:
58 | test2 = filterQ q2
^^^^^^^^^^
@jbrown215
jbrown215 / HandlerT.lh
Created March 20, 2017 04:26
LH HandlerT Refinement
## HandlerT refinements
```
module spec Yesod.Core.Types where
data HandlerT site m a <p :: User -> Bool> = Yesod.Core.Types.HandlerT {
unHandlerT :: Yesod.Core.Types.HandlerData site (Yesod.Core.Types.MonadRoute m) -> m a
}
data variance HandlerT covariant covariant covariant contravariant
/Users/JordanBrown/research/conference-management-system/Handler/Home.hs:115:14-39: Error: Liquid Type Mismatch
115 | liftM f x = x >>= \x' -> return (f x')
^^^^^^^^^^^^^^^^^^^^^^^^^^
Inferred type
VV : a
not a subtype of Required type
VV : {VV : a | papp2 f VV ?a}
@jbrown215
jbrown215 / gist:d445bbb5b26a7ac4e1fdf794d74e8d49
Created December 13, 2016 22:42
Query Authors for a paper
getAuthorList :: Entity Paper -> Handler [Entity Author]
getAuthorList (Entity paperId _paper) = runDB $ selectList [AuthorPaper ==. paperId] []
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDLUaUZ3HAPw1FkLnQATAfrYMRzHxR4gervZo9cSFIlihmoeBTNpNIFR40jHeD23zT34NSYdx4rMzFdrwgvQ1deiVLrz67HP/K/zDGTKoB0ufIGhuuaZlUMOMU0GModke6ukL98CUFoSJZr8Aj+PU6nrL6YiV3jsm8i8WpLz/zJv3nRjTYcVP376Jk1QJQtVIGi/Umxv0hkpW9rhWMmflaUq8/0hClPq+F1d6fUa7JDIOzynkpBxLhU4jSwXHWS+FSHgdhyryt/KbKtTCyrwTkHI7gZUR5jbvrerE4r8WgYcx98kPnoNuO7f1NmizWjB5aRioOQWJbjh2/tFkO4bifRzeRHTsGCciZ7pFIR30ZGp6T5dp2X1jWXM9pBDsjLROUaMHE2wWbmBRxky6xNiaZWocG/fScJpH8FvSt7v71p5yJLUHUh2MxQ201uNMaWucaMbNmc7G3vW5doKQmqk2YiHCyL+4uo4jVW12m+hO3mCmFSy0Zdki0zsLd6j0j+m0QtwQxhProkvkPstFSF0kc0NMD9joXY+M2q6UqO/2U8rRGnnxg3+6q/v7BUjV5sntPrA6EZiUMGREM/Ig6kgkebY0Kzg+M6cV2f8kDANHYv+iajcrvWmQnTknxkXr1iUUKOV/sVipDWloTWo+0hiTzMki6HXZ3bpUxMArfqo1/q+Q== jmbrown@andrew.cmu.edu